package edu.hm.devcamp.presentation.activities;

import java.util.ArrayList;
import java.util.List;

import android.app.Activity;
import android.os.Bundle;
import android.view.Window;
import android.view.WindowManager;
import android.widget.FrameLayout;
import edu.hm.devcamp.R;
import edu.hm.devcamp.presentation.views.ARPoiView;
import edu.hm.devcamp.presentation.views.ARSurface;
import edu.hm.devcamp.providers.Poi;
import edu.hm.devcamp.providers.PoiProviderRequest;

public class GeoAR extends Activity{

    private ARSurface cv;
    
    private ARPoiView arView;
    
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);        
        super.onCreate(savedInstanceState);
        
        setContentView(R.layout.ar_view);
        
        Poi[] poiArray = PoiProviderRequest.getList(this);
        
        List<Poi> pois = new ArrayList<Poi>();
        for(int i = 0; i < poiArray.length; i++){
            pois.add(poiArray[i]);
        }
        
        arView = (ARPoiView) findViewById(R.id.ar_poi_view);        
        cv = (ARSurface) findViewById(R.id.ar_surface);
                
        arView.setPois(pois);        
    }
}
